<!DOCTYPE html>
<html dir="ltr">

<head>
  <meta charset="UTF-8">
  <title>Menu</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
  <link href="../../../../../css/ionic.bundle.css" rel="stylesheet">
  <link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
  <script src="../../../../../scripts/testing/scripts.js"></script>
  <script src="../../../../../dist/ionic.js"></script>

  <style>
    .f {
      width: 200px;
      height: 200px;
      background: blue;
      margin: 20px auto;
    }

  </style>
</head>

<body>
  <ion-app>
    <ion-menu side="start" class="e2eLeftMenu">

      <ion-header>
        <ion-toolbar color="secondary">
          <ion-title>Left Menu</ion-title>
        </ion-toolbar>
      </ion-header>

      <ion-content>
        <ion-list>
          <ion-item>Open end Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
          <ion-item>Close Menu</ion-item>
        </ion-list>
      </ion-content>

      <ion-footer>
        <ion-toolbar color="secondary">
          <ion-title>Footer</ion-title>
        </ion-toolbar>
      </ion-footer>

    </ion-menu>

    <ion-menu side="end">
      <ion-header>
        <ion-toolbar>
          <ion-title>Hola</ion-title>
        </ion-toolbar>
      </ion-header>

      <ion-content padding>
        hola macho
      </ion-content>
    </ion-menu>

    <div class="ion-page" main>

      <ion-header>
        <ion-toolbar>
          <ion-title>Menu</ion-title>
        </ion-toolbar>
      </ion-header>

      <ion-content padding>
        <p>
          <ion-button id="left" onclick="openStart()">Open start menu</ion-button>
          <ion-button onclick="openEnd()">Open end menu</ion-button>
        </p>
        <p>
          <ion-button onclick="setPush()">Set Push</ion-button>
          <ion-button onclick="setOverlay()">Set Overlay</ion-button>
          <ion-button onclick="setReveal()">Set Reveal</ion-button>

          <ion-button onclick="setEnabled()">Set Swipe Enabled False</ion-button>
        </p>

        <div class="f"></div>
        <div class="f"></div>
        <div class="f"></div>
        <div class="f"></div>
        <div class="f"></div>
        <div class="f"></div>

      </ion-content>

    </div>

  </ion-app>
  <ion-menu-controller></ion-menu-controller>

  <script>
    const menu = document.querySelector('ion-menu-controller');
    function openStart() {
      console.log('Open start menu');
      menu.open('start');
    }
    function openEnd() {
      console.log('Open end menu');
      menu.open('end');
    }
    function setPush() {
      menu.get('start').type = 'push';
      menu.get('end').type = 'push';
    }
    function setOverlay() {
      menu.get('start').type = 'overlay';
      menu.get('end').type = 'overlay';
    }
    function setReveal() {
      menu.get('start').type = 'reveal';
      menu.get('end').type = 'reveal';
    }
    function setEnabled() {
      menu.get('start').swipeGesture = false;
    }
  </script>
</body>

</html>
